package fr.uvsq.isty.bdh.hchess.gui.menu;

import java.awt.Graphics;
import java.awt.Image;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.JPanel;


/**
 * A special panel with a transparent background.
 * @author Nathan
 *
 */
public class JEmptyPanel extends JPanel {

	
	/**
	 * Background image.
	 */
	private Image bg;
	
	public JEmptyPanel()
	{		
		//Background
		try {
			bg = ImageIO.read(getClass().getClassLoader()
                                .getResource("menu/empty.png"));
		} catch (IOException e1) {			
			e1.printStackTrace();
		}		
	}
	
	 @Override
	 public void paintComponent(Graphics g){
		g.drawImage(bg, 0, 0, this.getWidth(), this.getHeight(), this);
	 }
	
}
